home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
4810
/
4810.xpi
/
chrome
/
speeddial.jar
/
content
/
settings
/
pref-controls.js
< prev
next >
Wrap
Text File
|
2010-01-31
|
5KB
|
147 lines
var useContextualMenu;
function controlsPrefInit() {
useContextualMenu = (document.getElementById("rightClickAction").value == 6);
ctrlShortcutActionChanged();
ctrlShiftShortcutActionChanged();
altShortcutActionChanged();
altShiftShortcutActionChanged();
ctrlAltShiftShortcutActionChanged();
}
function rightClickActionChanged() {
if (document.getElementById("rightClickAction").value == 6) {
if (!useContextualMenu) {
useContextualMenu = true;
// Reset other values to "contextual menu"
document.getElementById("shiftRightClickAction").value = 6;
document.getElementById("controlRightClickAction").value = 6;
document.getElementById("altRightClickAction").value = 6;
}
} else {
if (useContextualMenu) {
useContextualMenu = false;
// Reset other values to "do nothing"
document.getElementById("shiftRightClickAction").value = 0;
document.getElementById("controlRightClickAction").value = 0;
document.getElementById("altRightClickAction").value = 0;
}
}
}
function shiftRightClickActionChanged() {
if (document.getElementById("shiftRightClickAction").value == 6) {
if (!useContextualMenu) {
useContextualMenu = true;
// Reset other values to "contextual menu"
document.getElementById("rightClickAction").value = 6;
document.getElementById("controlRightClickAction").value = 6;
document.getElementById("altRightClickAction").value = 6;
}
} else {
if (useContextualMenu) {
useContextualMenu = false;
// Reset other values to "do nothing"
document.getElementById("rightClickAction").value = 0;
document.getElementById("controlRightClickAction").value = 0;
document.getElementById("altRightClickAction").value = 0;
}
}
}
function controlRightClickActionChanged() {
if (document.getElementById("controlRightClickAction").value == 6) {
if (!useContextualMenu) {
useContextualMenu = true;
// Reset other values to "contextual menu"
document.getElementById("shiftRightClickAction").value = 6;
document.getElementById("rightClickAction").value = 6;
document.getElementById("altRightClickAction").value = 6;
}
} else {
if (useContextualMenu) {
useContextualMenu = false;
// Reset other values to "do nothing"
document.getElementById("shiftRightClickAction").value = 0;
document.getElementById("rightClickAction").value = 0;
document.getElementById("altRightClickAction").value = 0;
}
}
}
function altRightClickActionChanged() {
if (document.getElementById("altRightClickAction").value == 6) {
if (!useContextualMenu) {
useContextualMenu = true;
// Reset other values to "contextual menu"
document.getElementById("shiftRightClickAction").value = 6;
document.getElementById("controlRightClickAction").value = 6;
document.getElementById("rightClickAction").value = 6;
}
} else {
if (useContextualMenu) {
useContextualMenu = false;
// Reset other values to "do nothing"
document.getElementById("shiftRightClickAction").value = 0;
document.getElementById("controlRightClickAction").value = 0;
document.getElementById("rightClickAction").value = 0;
}
}
}
function ctrlShortcutActionChanged() {
var currentValue = document.getElementById("ctrlShortcutAction").value;
if ((currentValue == 0) || (currentValue == 6)) {
// Disable corresponding checkbox
document.getElementById("ctrlShortcutMultikey").disabled = true;
} else {
// Enable corresponding checkbox
document.getElementById("ctrlShortcutMultikey").disabled = false;
}
}
function ctrlShiftShortcutActionChanged() {
var currentValue = document.getElementById("ctrlShiftShortcutAction").value;
if ((currentValue == 0) || (currentValue == 6)) {
// Disable corresponding checkbox
document.getElementById("ctrlShiftShortcutMultikey").disabled = true;
} else {
// Enable corresponding checkbox
document.getElementById("ctrlShiftShortcutMultikey").disabled = false;
}
}
function altShortcutActionChanged() {
var currentValue = document.getElementById("altShortcutAction").value;
if ((currentValue == 0) || (currentValue == 6)) {
// Disable corresponding checkbox
document.getElementById("altShortcutMultikey").disabled = true;
} else {
// Enable corresponding checkbox
document.getElementById("altShortcutMultikey").disabled = false;
}
}
function altShiftShortcutActionChanged() {
var currentValue = document.getElementById("altShiftShortcutAction").value;
if ((currentValue == 0) || (currentValue == 6)) {
// Disable corresponding checkbox
document.getElementById("altShiftShortcutMultikey").disabled = true;
} else {
// Enable corresponding checkbox
document.getElementById("altShiftShortcutMultikey").disabled = false;
}
}
function ctrlAltShiftShortcutActionChanged() {
var currentValue = document.getElementById("ctrlAltShiftShortcutAction").value;
if ((currentValue == 0) || (currentValue == 6)) {
// Disable corresponding checkbox
document.getElementById("ctrlAltShiftShortcutMultikey").disabled = true;
} else {
// Enable corresponding checkbox
document.getElementById("ctrlAltShiftShortcutMultikey").disabled = false;
}
}